package com.meilingcloud.biobank.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 冻存管历史 对象 bank_tube_history
 *
 * @author chenl
 * @date 2021-04-01
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("bank_tube_history")
public class TubeHistory implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 历史ID
     */
    @TableId(value = "tube_his_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long tubeHisId;

    /**
     * 冻存管ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long tubeId;

    /**
     * 操作人
     */
    private String operator;

    /**
     * 操作时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date operatorTime;

    /**
     * 操作类型
     */
    private String operatorType;

    /**
     * 操作内容
     */
    private String operateContent;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
